

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.core.MediaType;

import org.apache.cxf.jaxrs.client.WebClient;

import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;

public class CXFWebClient {
	private static final String SERVICE_URL = "http://localhost/cxf/userservices/v1.0";
	
    public static void main(String[] args) {
        List<Object> providerList = new ArrayList<Object>();
        providerList.add(new JacksonJsonProvider());

        Object productList = WebClient.create(SERVICE_URL, providerList)
            .path("//earchuser/1")
            .accept(MediaType.APPLICATION_JSON)
            .get(Object.class);
      System.out.println(productList);
    }
}